package cz.cvut.fel.riak.parse;

import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;

import cz.cvut.fel.riak.email.Email;

public class ManualParser implements Parser {	
	
	private enum State { START, HEADERS, CONTENT }
	
	public Email parseEmail(String path) {
		StringBuffer sb = new StringBuffer(200000);
		State current = State.START;
		
		try {
			BufferedReader br = new BufferedReader(new FileReader(path));
			String line=null;
			while ((line = br.readLine()) != null) {
				sb.append(line);
				
				switch(current) {
				case START:
				case HEADERS:
					
					
					break;
				}
				
				System.out.println(line);
			}
			
			
		} catch (FileNotFoundException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		} 
		
		return null;
	}

}
